<h1>Listing order_items</h1>

<table>
  <tr>
    <th>Product</th>
    <th>Order</th>
    <th>Count</th>
  </tr>

<% @order_items.each do |order_item| %>
  <tr>
    <td><%=h order_item.product_id %></td>
    <td><%=h order_item.order_id %></td>
    <td><%=h order_item.count %></td>
    <td><%= link_to 'Show', order_item %></td>
    <td><%= link_to 'Edit', edit_order_item_path(order_item) %></td>
    <td><%= link_to 'Destroy', order_item, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New order_item', new_order_item_path %>